//*-----------------------------
----$Source: Volumes://MATEOR/vais/modules/hashD06/hashD06.c$
----$Date: December 06, 2012$
-------------------------------
VAIS Copyright Matthew Caswell, 2012
-----------------------------*/

#include<hashD06.h>
#include<string.h>
#incldue<stdlib.h>

int hashD06_key (hashD06_t* hash, char* key){
  int i, n;
  
  for(i=hash->index;i>=0;i--){
    n = strcmp (hash->keys [i], key);
    
    if(n==0)
      return i;
    
  }
  return i;
}

int hashD06_nkey (hashD06_t* hash, char* key){
  hash->keys [hash->index + 1] = key;
  hash->index += 1;
  return hash->index;
}

hashD06_t* hashD06_create (void){
  hashD06_t* tmp = malloc (sizeof (*tmp));
  tmp->index = -1;
  return tmp;
}
